package ru.stepuk.modeller;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.PropertyException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import ru.stepuk.modeller.distributions.DiscreteDistribution;
import ru.stepuk.modeller.distributions.Distribution;
import ru.stepuk.modeller.generators.MersenneTwister;

/**
 *
 * @author ivan
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
//        FileOutputStream fos = null;
//        try {
//            fos = new FileOutputStream("test.xml");
//        } catch (FileNotFoundException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }
//
//        JAXBContext jc = null;
//        Marshaller m = null;
//        try {
//            jc = JAXBContext.newInstance(ru.stepuk.modeller.Model.class);
//            m = jc.createMarshaller();
//        } catch (JAXBException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        try {
//            m.setProperty("jaxb.formatted.output", true);
//        } catch (PropertyException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }
//
//        Model mod = new Model("Test model");
//        try {
//            m.marshal(mod, fos);
//        } catch (JAXBException ex) {
//            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
//        }
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        DocumentBuilder db = null;
        try {
            db = dbf.newDocumentBuilder();
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
        Document d = db.newDocument();
        Element e = d.createElement("Test");
        

    }
}
